<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<p>点击次数：{{count}}</p>
			<!-- 可以用表达式完成事件操作 -->
			<button type="button" @click="count++">点击1</button>
			<!-- 获取事件对象 -->
			<button type="button" @click="clickEvent">点击2</button>
		</div>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			let app = new Vue({
				el:"#app",
				data:{
					count:0
				},
				methods:{
					clickEvent:function(event){
						console.log(event);
						console.log(this);
						this.count++;
					}
				}
			})
		</script>
	</body>
</html>
